# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-inflection
pkgver=0.5.1
pkgrel=6
pkgdesc="A port of Ruby on Rails inflector to Python"
url="https://github.com/jpvanhal/inflection"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jpvanhal/inflection/archive/$pkgver.tar.gz")
sha512sums=('a976cf40a79921f55fbf45b56febb59c6be9e840aac80213ab26915afe4699d96b99888a88e215f26af39497e8cfbe501a38ecf910b6c89d8c4edbf4e176406b')

build() {
  cd inflection-$pkgver
  python setup.py build
}

check() {
  cd inflection-$pkgver
  python setup.py pytest
}

package() {
  cd inflection-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
